<?php
//header('Content-Type: text/html; charset=utf-8');
$num="";
$str='0123456789abcdefghijklnmopqrstuvwxcyzABCDEFGHIJKLNMOPQRSTUVWXVZ';

for ($i=0; $i <1 ; $i++) { 
	$num=$num.substr($str, rand(0, 59),6);
}

session_start();
$_SESSION['yzm']=$num;

$image=imagecreate(35, 35);
$blue=imagecolorallocate($image, 28, 155, 226);
$white=imagecolorallocate($image, 255, 255, 255);
//imagestring($image, $font, $x, $y, $string, $color)
imagestring($image,20, 12, 10, $num, $white);
header('content-type:image/gif');
imagegif($image);
?>